<!DOCTYPE html>
<html>
<head>
    <title>秒刷记录</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="../../public/css/bootstrap.min.css">
    <link rel="stylesheet" href="../../public/css/font-awesome.min.css">
    <link rel="stylesheet" href="../../public/plugins/jqgrid/ui.jqgrid-bootstrap.css">
    <link rel="stylesheet" href="../../public/plugins/ztree/css/metroStyle/metroStyle.css">
    <!--日期选择插件-->
    <link rel="stylesheet" href="../../public/plugins/datePicker/css/flatpicker.css">

    <link rel="stylesheet" href="../../public/css/main.css">
    <script src="../../public/libs/jquery.min.js"></script>
    <script src="../../public/plugins/layer/layer.js"></script>
    <script src="../../public/libs/bootstrap.min.js"></script>
    <script src="../../public/libs/vue.min.js"></script>
    <script src="../../public/plugins/jqgrid/grid.locale-cn.js"></script>
    <script src="../../public/plugins/jqgrid/jquery.jqGrid.min.js"></script>
    <script src="../../public/plugins/ztree/jquery.ztree.all.min.js"></script>
    <script src="../../public/js/common.js"></script>
    <style>
        .table_title {
            text-align: right;
            background-color: #f1f2f3;
        }
        .table_title_center {
            text-align: center;
            background-color: #f1f2f3;
        }
    </style>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn" style="height: 34px;">
            <div class="form-group col-sm-2" style="width: 160px;">
                <select id="accessId" class="form-control">
                    <option value="0">请选通道</option>
                    <option v-for="access in accesses" :value="access.payAccessId" v-html="access.accessName"></option>
                </select>
            </div>
            <div class="form-group col-sm-2" style="width: 160px;">
                <select id="orderStatus" class="form-control">s
                    <option value="0">订单状态</option>
                    <option value="1">未付款</option>
                    <option value="2">已取消</option>
                    <option value="3">已退款</option>
                    <option value="4">处理中</option>
                    <option value="6">提现失败</option>
                    <option value="7">支付成功</option>
                    <option value="8">缴费成功</option>
                    <option value="9">奖励成功</option>
                </select>
            </div>
            <div class="form-group col-sm-2" style="width: 160px;">
                <input type="date" class="form-control" id="createDate" name="createDate" placeholder="开始时间">
            </div>
            <div class="form-group col-sm-2" style="width: 160px;">
                <input type="date" class="form-control" id="endDate" name="endDate" placeholder="结束时间">
            </div>
            <div class="form-group col-sm-2" style="width: 180px;">
                <input type="text" class="form-control" id="phone" name="search" placeholder="手机号">
            </div>
            <div class="form-group col-sm-2" style="width: 180px;">
                <input type="text" class="form-control" id="orderNum" name="search" placeholder="订单号">
            </div>
            <a class="btn btn-primary" @click="query"><i class="fa fa-search-minus"></i>&nbsp;查询</a>
            <a class="btn btn-primary" @click="reload"><i class="fa fa-resistance"></i>&nbsp;清空</a>
            <a class="btn btn-primary" v-if="hasPermission('platform:manage:payrecord:info')" @click="getInfo"><i class="fa fa-info"></i>&nbsp;详情</a>
            <a class="btn btn-primary" v-if="hasPermission('platform:manage:payrecord:summary')" @click="summary"><i class="fa fa-subway"></i>&nbsp;汇总</a>
            <a class="btn btn-primary" v-if="hasPermission('platform:manage:payrecord:download')" @click="download"><i class="fa fa-download"></i>&nbsp;下载</a>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="showSummary" class="panel panel-default">
        <div class="panel-heading">汇总信息</div>
        <table class="table table-bordered">
            <tr>
                <td class="table_title_center col-md-2">交易状态</td>
                <td class="col-md-2 table_title_center">交易笔数</td>
                <td class="table_title_center col-md-2">交易金额</td>
                <td class="col-md-2 table_title_center">交易手续费</td>
                <td class="col-md-2 table_title_center">网关成本</td>
                <td class="col-md-2 table_title_center">利润</td>
            </tr>
            <tr>
                <td class="table_title_center col-md-2">订单未付款</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.noPayCount.orderCount">0</td>
                <td class="table_title_center col-md-2" v-html="summaryData.noPayCount.amountTotalCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.noPayCount.serviceCostCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.noPayCount.gatewayCostCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.noPayCount.profitCount">0</td>
            </tr>
            <tr>
                <td class="table_title_center col-md-2">处理中</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.doingCount.orderCount">0</td>
                <td class="table_title_center col-md-2" v-html="summaryData.doingCount.amountTotalCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.doingCount.serviceCostCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.doingCount.gatewayCostCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.doingCount.profitCount">0</td>
            </tr>
            <tr>
                <td class="table_title_center col-md-2">支付失败</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.failedCount.orderCount">0</td>
                <td class="table_title_center col-md-2" v-html="summaryData.failedCount.amountTotalCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.failedCount.serviceCostCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.failedCount.gatewayCostCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.failedCount.profitCount">0</td>
            </tr>
            <tr>
                <td class="table_title_center col-md-2">支付成功</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.paySuccessCount.orderCount">0</td>
                <td class="table_title_center col-md-2" v-html="summaryData.paySuccessCount.amountTotalCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.paySuccessCount.serviceCostCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.paySuccessCount.gatewayCostCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.paySuccessCount.profitCount">0</td>
            </tr>
            <tr>
                <td class="table_title_center col-md-2">支付提现成功</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.depositSuccessCount.orderCount">0</td>
                <td class="table_title_center col-md-2" v-html="summaryData.depositSuccessCount.amountTotalCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.depositSuccessCount.serviceCostCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.depositSuccessCount.gatewayCostCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.depositSuccessCount.profitCount">0</td>
            </tr>
            <tr>
                <td class="table_title_center col-md-2">退款中</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.refundingCount.orderCount">0</td>
                <td class="table_title_center col-md-2" v-html="summaryData.refundingCount.amountTotalCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.refundingCount.serviceCostCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.refundingCount.gatewayCostCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.refundingCount.profitCount">0</td>
            </tr>
            <tr>
                <td class="table_title_center col-md-2">已退款</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.refundCount.orderCount">0</td>
                <td class="table_title_center col-md-2" v-html="summaryData.refundCount.amountTotalCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.refundCount.serviceCostCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.refundCount.gatewayCostCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.refundCount.profitCount">0</td>
            </tr>
            <tr>
                <td class="table_title_center col-md-2">缴费成功</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.vipSuccessCount.orderCount">0</td>
                <td class="table_title_center col-md-2" v-html="summaryData.vipSuccessCount.amountTotalCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.vipSuccessCount.serviceCostCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.vipSuccessCount.gatewayCostCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.vipSuccessCount.profitCount">0</td>
            </tr>
            <tr>
                <td class="table_title_center col-md-2">奖励成功</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.rewaaedCount.orderCount">0</td>
                <td class="table_title_center col-md-2" v-html="summaryData.rewaaedCount.amountTotalCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.rewaaedCount.serviceCostCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.rewaaedCount.gatewayCostCount">0</td>
                <td class="col-md-2 table_title_center" v-html="summaryData.rewaaedCount.profitCount">0</td>
            </tr>
        </table>
        <div class="col-sm-12 text-center">
            <button class="btn btn-danger btn-lg center-block" style="width: 200px;margin-top: 20px;" @click="reload" >返回</button>
        </div>
    </div>

    <div v-show="showInfo" class="panel panel-default">
        <div class="panel-heading">记录详情</div>
        <table class="table table-bordered">
            <tr>
                <td class="table_title col-md-3">订单号：</td>
                <td class="col-md-3">
                    <span v-html="record.order.orderNum"></span>
                </td>
                <td class="table_title col-md-3">订单状态：</td>
                <td class="col-md-3">
                    <span v-if="record.order.status==-1" class="label label-danger">已取消</span>
                    <span v-if="record.order.status==1" class="label label-danger">未付款</span>
                    <span v-if="record.order.status==2" class="label label-danger">已取消</span>
                    <span v-if="record.order.status==3" class="label label-danger">已退款</span>
                    <span v-if="record.order.status==4" class="label label-danger">处理中</span>
                    <!--<span v-if="record.order.status==5" class="label label-danger">已取消</span>-->
                    <span v-if="record.order.status==6" class="label label-danger">提现失败</span>
                    <span v-if="record.order.status==7" class="label label-success">支付成功</span>
                    <span v-if="record.order.status==8" class="label label-success">缴费成功</span>
                </td>
            </tr>
            <tr>
                <td class="table_title col-md-3">订单数量：</td>
                <td class="col-md-3">
                    <span v-html="record.order.count"></span>
                </td>
                <td class="table_title col-md-3">服务费：</td>
                <td class="col-md-3">
                    <span v-html="record.order.serviceCost"></span>
                </td>
            </tr>
            <tr>
                <td class="table_title col-md-3">交易银行：</td>
                <td class="col-md-3">
                    <span v-html="record.order.payBank"></span>
                </td>
                <td class="table_title col-md-3">交易卡号：</td>
                <td class="col-md-3">
                    <span v-html="record.order.payCardNo"></span>
                </td>
            </tr>
            <tr>
                <td class="table_title col-md-3">网关成本：</td>
                <td class="col-md-3">
                    <span v-html="record.order.gatewayCost"></span>
                </td>
                <td class="table_title col-md-3">利润：</td>
                <td class="col-md-3">
                    <span v-html="record.order.profit"></span>
                </td>
            </tr>
            <tr>
                <td class="table_title col-md-3">到账金额：</td>
                <td class="col-md-3">
                    <span v-html="record.order.realAmount"></span>
                </td>
                <td class="table_title col-md-3">刷卡金额：</td>
                <td class="col-md-3">
                    <span v-html="record.order.amountTotal"></span>
                </td>
            </tr>
            <tr>
                <td class="table_title col-md-3">第三方流水号：</td>
                <td class="col-md-3">
                    <span v-html="record.order.outTradeNum"></span>
                </td>
                <td class="table_title col-md-3">支付网关：</td>
                <td class="col-md-3">
                    <span v-html="record.order.accessName"></span>
                </td>
            </tr>
            <tr>
                <td class="table_title col-md-3">通道：</td>
                <td class="col-md-3">
                    <span v-html="record.order.accessFormerly"></span>
                </td>
                <td class="table_title col-md-3"></td>
                <td class="col-md-3">
                    <span v-html=""></span>
                </td>
            </tr>
            <tr>
                <td class="table_title col-md-3">订单创建时间：</td>
                <td class="col-md-3">
                    <span v-html="record.order.createDate"></span>
                </td>
                <td class="table_title col-md-3">交易时间：</td>
                <td class="col-md-3">
                    <span v-html="record.order.transDate"></span>
                </td>
            </tr>
            <tr>
                <td class="table_title col-md-3">到账时间：</td>
                <td class="col-md-3">
                    <span v-html="record.order.finishDate"></span>
                </td>
                <td class="table_title col-md-3">刷卡IP：</td>
                <td class="col-md-3">
                    <span>{{record.order.orderIp == 'null' ? '未知' : record.order.orderIp}}</span>
                </td>
            </tr>
            <tr>
                <td class="table_title col-md-3">结算银行：</td>
                <td class="col-md-3">
                    <span v-html="record.order.collecBank"></span>
                </td>
                <td class="table_title col-md-3">结算账号：</td>
                <td class="col-md-3" v-html="record.order.cashCardNo"></td>
            </tr>
            <tr>
                <td class="table_title col-md-3">备注信息：</td>
                <td class="col-md-3">
                    <span v-html="record.order.remark"></span>
                </td>
            </tr>

            <tr>
                <td class="table_title col-md-3">用户名：</td>
                <td class="col-md-3">
                    <span v-html="record.customer.customerName"></span>
                </td>
                <td class="table_title col-md-3">商户号：</td>
                <td class="col-md-3">
                    <span v-html="record.customer.uniqueId"></span>
                </td>
            </tr>
            <tr>
                <td class="table_title col-md-3">手机号：</td>
                <td class="col-md-3">
                    <span v-html="record.customer.phone"></span>
                </td>
                <td class="table_title col-md-3">appId：</td>
                <td class="col-md-3">
                    <span v-html="record.customer.appId"></span>
                </td>
            </tr>
            <tr>
                <td class="table_title col-md-3">APP名称：</td>
                <td class="col-md-3">
                    <span v-html="record.customer.appName"></span>
                </td>
                <td class="table_title col-md-3">身份证号：</td>
                <td class="col-md-3">
                    <span v-html="record.customer.idCard"></span>
                </td>
            </tr>
            <tr>
                <td class="table_title col-md-3">实名状态：</td>
                <td class="col-md-3">
                    <span v-html="record.customer.isReal"></span>
                </td>
                <td class="table_title col-md-3">登录时间：</td>
                <td class="col-md-3">
                    <span v-html="record.customer.loginDate"></span>
                </td>
            </tr>
            <tr>
                <td class="table_title col-md-3">登出时间：</td>
                <td class="col-md-3">
                    <span v-html="record.customer.outDate"></span>
                </td>
            </tr>
        </table>

        <div class="col-sm-12 text-center">
            <button class="btn btn-danger btn-lg center-block" style="width: 200px;margin-top: 20px;" @click="reload" >返回</button>
        </div>
    </div>
</div>
<script src="../../public/plugins/datePicker/js/flatpicker.js"></script>
<script src="../../public/plugins/datePicker/js/zh.js"></script>
<script src="../../public/js/sys/payRecord.js"></script>
</body>
</html>